import os
oldfilename =input('请输入文件名:')

filename,extend = os.path.splitext(oldfilename)
newfilename = filename+'-副本'+ extend

oldfile = open(oldfilename,mode='rb')
newfile = open(newfilename,mode='ab')

while True:
    content = oldfile.read(1024)
    if not content:
        break

    newfile.write(content)

oldfile.close()
newfile.close()